
@Test

var object = {
  foo : function() {
    this.bar();
  },

  bar : function() {
    throw new Error("I'm a really bad exception!");
  }
};

var context = new Debugger.Context(function(event) {
  print("Oops! You became exceptional.");
});

Debugger.attach(object, context);

object.foo();
